
package com.budwk.app.miniapp.models;


import com.budwk.starter.common.openapi.annotation.ApiModel;
import com.budwk.starter.common.openapi.annotation.ApiModelProperty;
import com.budwk.starter.database.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import org.nutz.json.ToJson;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 微信用户
 *

 * @date 2023-08-28 15:39:39
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Table("wx_user")
@ApiModel(description = "微信用户表")
public class WxUser extends BaseModel implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Name
    @Column
    @Comment("主键ID")
    @ApiModelProperty(description = "主键ID")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @PrevInsert(uu32 = true)
    private String id;


    /**
     * 备注信息
     */
    @Column
    @Comment("备注信息")
    @ApiModelProperty(description = "备注信息")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String remark;

    /**
     * 应用类型(1:小程序，2:公众号)
     */
    @Column
    @Comment("应用类型(1:小程序，2:公众号)")
    @ApiModelProperty(description = "应用类型(1:小程序，2:公众号)")
    @ColDefine(type = ColType.CHAR, width = 20)
    private String appType;

    /**
     * 是否订阅（0：是；1：否；2：网页授权用户）
     */
    @Column
    @Comment("是否订阅（0：是；1：否；2：网页授权用户）")
    @ApiModelProperty(description = "是否订阅（0：是；1：否；2：网页授权用户）")
    @ColDefine(type = ColType.CHAR, width = 2)
    private String subscribe;

    /**
     * 返回用户关注的渠道来源，ADD_SCENE_SEARCH 公众号搜索，ADD_SCENE_ACCOUNT_MIGRATION 公众号迁移，ADD_SCENE_PROFILE_CARD 名片分享，ADD_SCENE_QR_CODE 扫描二维码，ADD_SCENEPROFILE LINK 图文页内名称点击，ADD_SCENE_PROFILE_ITEM 图文页右上角菜单，ADD_SCENE_PAID 支付后关注，ADD_SCENE_OTHERS 其他
     */
    @Column
    @Comment("返回用户关注的渠道来源，ADD_SCENE_SEARCH 公众号搜索，ADD_SCENE_ACCOUNT_MIGRATION 公众号迁移，ADD_SCENE_PROFILE_CARD 名片分享，ADD_SCENE_QR_CODE 扫描二维码，ADD_SCENEPROFILE LINK 图文页内名称点击，ADD_SCENE_PROFILE_ITEM 图文页右上角菜单，ADD_SCENE_PAID 支付后关注，ADD_SCENE_OTHERS 其他")
    @ApiModelProperty(description = "返回用户关注的渠道来源，ADD_SCENE_SEARCH 公众号搜索，ADD_SCENE_ACCOUNT_MIGRATION 公众号迁移，ADD_SCENE_PROFILE_CARD 名片分享，ADD_SCENE_QR_CODE 扫描二维码，ADD_SCENEPROFILE LINK 图文页内名称点击，ADD_SCENE_PROFILE_ITEM 图文页右上角菜单，ADD_SCENE_PAID 支付后关注，ADD_SCENE_OTHERS 其他")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    private String subscribeScene;

    /**
     * 关注时间
     */
    @Column
    @Comment("关注时间")
    @ApiModelProperty(description = "关注时间")
    @ColDefine(type = ColType.TIMESTAMP, width = 6)
    private LocalDateTime subscribeTime;

    /**
     * 关注次数
     */
    @Column
    @Comment("关注次数")
    @ApiModelProperty(description = "关注次数")
    @ColDefine(type = ColType.INT, width = 4)
    private Integer subscribeNum;

    /**
     * 取消关注时间
     */
    @Column
    @Comment("取消关注时间")
    @ApiModelProperty(description = "取消关注时间")
    @ColDefine(type = ColType.TIMESTAMP, width = 6)
    private LocalDateTime cancelSubscribeTime;

    /**
     * 用户标识
     */
    @Column("open_id")
    @Comment("用户标识")
    @ApiModelProperty(description = "用户标识")
    @ColDefine(type = ColType.VARCHAR, width = 64)
    private String openId;

    /**
     * 昵称
     */
    @Column("nick_name")
    @Comment("用户标识")
    @ApiModelProperty(description = "用户标识")
    @ColDefine(type = ColType.VARCHAR, width = 64)
    private String nickName;

    /**
     * 性别（1：男，2：女，0：未知）
     */
    @Column
    @Comment("性别（1：男，2：女，0：未知）")
    @ApiModelProperty(description = "性别（1：男，2：女，0：未知）")
    @ColDefine(type = ColType.CHAR, width = 2)
    private String sex;

    /**
     * 所在城市
     */
    @Column
    @Comment("所在城市")
    @ApiModelProperty(description = "所在城市")
    @ColDefine(type = ColType.VARCHAR, width = 64)
    private String city;

    /**
     * 所在国家
     */
    @Column
    @Comment("所在国家")
    @ApiModelProperty(description = "所在国家")
    @ColDefine(type = ColType.VARCHAR, width = 64)
    private String country;

    /**
     * 所在省份
     */
    @Column
    @Comment("所在省份")
    @ApiModelProperty(description = "所在省份")
    @ColDefine(type = ColType.VARCHAR, width = 64)
    private String province;

    /**
     * 手机号码
     */
    @Column
    @Comment("手机号码")
    @ApiModelProperty(description = "手机号码")
    @ColDefine(type = ColType.VARCHAR, width = 15)
    private String phone;

    /**
     * 用户语言
     */
    @Column
    @Comment("用户语言")
    @ApiModelProperty(description = "用户语言")
    @ColDefine(type = ColType.VARCHAR, width = 64)
    private String language;

    /**
     * 头像
     */
    @Column("headimg_url")
    @Comment("头像")
    @ApiModelProperty(description = "头像")
    @ColDefine(type = ColType.VARCHAR, width = 1000)
    private String headImgUrl;

    /**
     * union_id
     */
    @Column
    @Comment("union_id")
    @ApiModelProperty(description = "union_id")
    @ColDefine(type = ColType.VARCHAR, width = 64)
    private String unionId;

    /**
     * 用户组
     */
    @Column
    @Comment("用户组")
    @ApiModelProperty(description = "用户组")
    @ColDefine(type = ColType.VARCHAR, width = 64)
    private String groupId;

    /**
     * 标签列表
     */
    @Column("tagid_list")
    @Comment("标签列表")
    @ApiModelProperty(description = "标签列表")
    @ColDefine(type = ColType.VARCHAR, width = 64)
    private String tagidList;

    /**
     * 二维码扫码场景
     */
    @Column("qr_scene_str")
    @Comment("二维码扫码场景")
    @ApiModelProperty(description = "二维码扫码场景")
    @ColDefine(type = ColType.VARCHAR, width = 64)
    private String qrSceneStr;

    /**
     * 地理位置纬度
     */
    @Column
    @Comment("地理位置纬度")
    @ApiModelProperty(description = "地理位置纬度")
    @ColDefine(type = ColType.DOUBLE, width = 53, precision = 6)
    private Double latitude;

    /**
     * 地理位置经度
     */
    @Column
    @Comment("地理位置经度")
    @ApiModelProperty(description = "地理位置经度")
    @ColDefine(type = ColType.DOUBLE, width = 53, precision = 6)
    private Double longitude;

    /**
     * 地理位置精度
     */
    @Column
    @Comment("地理位置精度")
    @ApiModelProperty(description = "地理位置精度")
    @ColDefine(type = ColType.DOUBLE, precision = 8)
    private Double precision;

    /**
     * 会话密钥
     */
    @Column("session_key")
    @Comment("会话密钥")
    @ApiModelProperty(description = "会话密钥")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String sessionKey;

    /**
     * 密码
     */
    @Column
    @Comment("密码")
    @ApiModelProperty(description = "密码")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String password;

    /**
     * 积分
     */
    @Column
    @Comment("积分")
    @ApiModelProperty(description = "积分")
    @ColDefine(type = ColType.DOUBLE, precision = 8)
    private Double points;

    /**
     * 是否接收事件的推送
     */
    @Column("receive_event")
    @Comment("是否接收事件的推送")
    @ApiModelProperty(description = "是否接收事件的推送")
    @ColDefine(type = ColType.VARCHAR, width = 25)
    private Boolean receiveEvent;

    @Column("card_id")
    @ColDefine(type = ColType.VARCHAR, width = 128)
    private String cardId;
    /**
     * 登录token
     */
    private String loginToken;

    /**
     * token刷新
     */
    private String refreshToken;
}
